package com.neusoft.yuejian_6.activity;

import android.app.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Window;
import android.widget.ImageView;
import android.widget.TextView;

import com.neusoft.yuejian_6.R;
import com.squareup.picasso.Picasso;

public class ConInfoActivity extends Activity {


    private ImageView contest_pic;
    private TextView contest_intro;
    private TextView contest_phone;
    private TextView contest_regist_time;
    private int contest_id;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏

        setContentView(R.layout.activity_con_info);
        initView();
        getContestData();
    }

    private void getContestData() {
        Bundle bundle = this.getIntent().getExtras();
        String contestintro = bundle.getString("contest_intro");
        String contestregisttime = bundle.getString("contest_regist_time");
        String contestphone = bundle.getString("contest_phone");
        // int tprice = bundle.getInt("t_price");
        String tpic = "http://10.0.2.2/neu1_yuejian/Public/Admin/photo/"+bundle.getString("contest_pic");
        //String ttime = bundle.getString("t_time");
        //System.out.print("taddress");
        contest_intro.setText(contestintro);
        contest_regist_time.setText(contestregisttime);
        contest_phone.setText(contestphone+"");
        // t_price.setText(tprice+"");
        //System.out.print("train_intro");
        //   t_time.setText(ttime);
        Picasso.with(this).load(tpic).into(contest_pic);
    }


    private void initView() {

        contest_pic = (ImageView) findViewById(R.id.contest_pic);
        contest_intro = (TextView) findViewById(R.id.contest_intro);
        contest_regist_time = (TextView) findViewById(R.id.contest_regist_time);
        contest_phone = (TextView) findViewById(R.id.contest_phone);
    }

    /**
     * ATTENTION: This was auto-generated to implement the App Indexing API.
     * See https://g.co/AppIndexing/AndroidStudio for more information.
     */

}


